package com.bawei.a2010kotlin.viewmodel_livedata

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel

class MyViewModel: ViewModel() {
    var  num:Int = 5
    lateinit var  numData:MutableLiveData<Int>
    init{
        numData.value = 5 //setValue 主线程中赋值   num.postValue():子线程赋值
    }
}